<template>
  <div class="not-found-page">
    <div class="not-found-content">
      <div class="emoji">🧐</div>
      <h1>404</h1>
      <p class="message">哎呀！页面好像迷路了...</p>
      <p class="description">就像大学生找食堂一样，转了半天还是找不到！</p>

      <div class="actions">
        <el-button type="primary" @click="goHome" size="large">
          <i class="fa fa-home"></i> 回到首页
        </el-button>
        <el-button @click="goBack" size="large">
          <i class="fa fa-arrow-left"></i> 返回上一页
        </el-button>
      </div>

      <div class="funny-tip">
        <p>💡 小贴士：也许你可以试试以下操作：</p>
        <ul>
          <li>检查网址是否正确（就像检查作业答案一样仔细）</li>
          <li>重新登录系统（就像重启路由器一样神奇）</li>
          <li>联系管理员（就像找班委帮忙一样）</li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { ElButton } from 'element-plus'

const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped lang="scss">
.not-found-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: rgb(36, 119, 253);
  font-family: 'Arial', sans-serif;

  .not-found-content {
    text-align: center;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;

    .emoji {
      font-size: 60px;
      margin-bottom: 20px;
    }

    h1 {
      font-size: 72px;
      color: #e74c3c;
      margin: 20px 0;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }

    .message {
      font-size: 24px;
      color: #333;
      margin-bottom: 10px;
    }

    .description {
      font-size: 16px;
      color: #666;
      margin-bottom: 30px;
      font-style: italic;
    }

    .actions {
      margin: 30px 0;

      .el-button {
        margin: 0 10px;
      }
    }

    .funny-tip {
      background: #f8f9fa;
      border-radius: 10px;
      padding: 20px;
      text-align: left;

      p {
        font-weight: bold;
        color: #555;
        margin-bottom: 10px;
      }

      ul {
        padding-left: 20px;

        li {
          margin-bottom: 8px;
          color: #777;
        }
      }
    }
  }
}
</style>
